package com.Logistics.truck;

import com.Logistics.entity.address.CityBean;
import com.Logistics.entity.address.DistrictBean;
import com.Logistics.entity.address.ProvinceBean;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "pd-base", path = "/addressCollection")
public interface AddressCollectionFeignClient {

    /**
     * 查询所有省份
     * @return 省份结果集
     */
    @GetMapping("/queryAllProvinces")
    public List<ProvinceBean> QueryAllProvinces();

    /**
     * 根据id查询省份
     * @param id 省份id
     * @return 省份信息
     */
    @PostMapping("/queryProvincesBasedOnId")
    public ProvinceBean QueryProvincesBasedOnId (@RequestParam("id") String id) ;

    /**
     * 根据id集合查询省份集合
     * @param id 省份id集合
     * @return 省份结果集
     */
    @PostMapping("/QueryProvincesBasedOnIdList")
    public List<ProvinceBean> QueryProvincesBasedOnIdList (@RequestParam("id") List<String> id) ;

    /**
     * 根据id查询城市
     * @param id 城市id
     * @return 城市信息
     */
    @PostMapping("/queryCityBasedOnId")
    public CityBean QueryCityBasedOnId (@RequestParam("id") String id) ;

    /**
     * 根据id集合查询城市集合
     * @param id 城市id集合
     * @return 城市结果集
     */
    @PostMapping("/QueryCityBasedOnIdList")
    public List<CityBean> QueryCityBasedOnIdList (@RequestParam("id") List<String> id) ;

    /**
     * 根据id查询区县
     * @param id 区县id
     * @return 区县信息
     */
    @PostMapping("/queryDistrictsAndCountiesBasedOnId")
    public DistrictBean QueryDistrictsAndCountiesBasedOnId (@RequestParam("id") String id) ;

    /**
     * 根据id集合查询区县集合
     * @param id 区县id集合
     * @return 区县结果集
     */
    @PostMapping("/QueryDistrictsAndCountiesBasedOnIdList")
    public List<DistrictBean> QueryDistrictsAndCountiesBasedOnIdList (@RequestParam("id") List<String> id);

    /**
     * 根据省份id查询城市信息
     * @param id 省份id
     * @return 城市结果集
     */
    @PostMapping("/provincialInspectionCity")
    public List<CityBean> ProvincialInspectionCity(@RequestParam("id") String id) ;

    /**
     * 根据城市id查询区县信息
     * @param id 城市id
     * @return 区县结果集
     */
    @PostMapping("/shichaDistrict")
    public List<DistrictBean> ShichaDistrict(@RequestParam("id") String id);
}
